package com.zjun.demo.experimentaldemo.udp.call

import io.netty.channel.ChannelFuture

class NettyException(message: String?,val code:Int,val future: ChannelFuture? = null) : Exception(message){

    companion object{

        /**
         * netty发送消息失败
         */
        const val Netty_SEND_FAIL = -1

        /**
         * 通道未初始化
         */
        const val CHANNEL_NOT_INITIALIZED = -2

        /**
         * 通道不可写
         */
        const val CHANNEL_NOT_WRITABLE = -3

        /**
         * 通道未激活
         */
        const val CHANNEL_NOT_ACTIVE = -4

        /**
         * 链接尚未建立
         */
        const val NETTY_NOT_CONNECT = -5

    }

}

class NettyConnectException : Exception("长连接没有连接")


